$(function () {
		var price1=localStorage.place1;
		var price2=localStorage.place2;
		$('.mutow').val(price1);
		$('.muthree').val(price2);
	})
$(".return").click(function(){
	var mutow = $(".mutow").val();
	if(mutow==''){
		layer.msg('请输入价格');
		return false;
	}
	if(!/^[0-9]*$/.test(mutow)){
		layer.msg("请输入整数");
		return false;
	}
	var muthree = $(".muthree").val();
	if(muthree==''){
		layer.msg('请输入价格');
		return false;
	}
	if(!/^[0-9]*$/.test(muthree)){
		layer.msg("请输入整数");
		return false;
	}
	var token = localStorage.phone;
	$.ajax({
		url:'https://newapp.icandrive.cn/api/price.php',
		dataType:'json',
		data:{token:token,muthree:muthree,mutow:mutow},
		type:'post',
		success:function(data){
			if(data.status==250){
            layer.msg('请重新登录',function(){
                window.location.href="../login/log_in.html";
            },2000)
		}
		if(data.status==200){
			layer.msg('修改成功',function(){
                history.back();
            },2000)
		}
		if(data.status==400){
			layer.msg('操作失败');
		}
	},
	error:function(){
		 layer.msg('系统繁忙',function(){
                                history.go(0)
                            },1000);
	}
	});
});


/*监听手机返回按键*/
 return_keybord();
